<script lang="ts" setup>
  import deptStatistics from './components/deptStatistics'
  import categoryStatistics from './components/categoryStatistics'
  const activeIndex = ref('dept')
</script>

<template>
  <div class="container">
    <el-tabs v-model="activeIndex">
      <el-tab-pane label="按部门统计" name="dept">
        <dept-statistics v-if="activeIndex === 'dept'" />
      </el-tab-pane>
      <el-tab-pane label="按分类统计" name="category">
        <category-statistics v-if="activeIndex === 'category'" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<style scoped>
  .container {
    padding: 15px;
  }
</style>
